// 医护管理-查房记录

import r from '@/utils/request';
import type { ResponseType, ListParams, ListResponseType } from '../types';

enum API {
    checkRoomList = '/checkRoom/list', // 查房记录列表
    checkRoomDelete = '/checkRoom/delete', // 删除查房记录信息
    checkRoomAdd = '/checkRoom/add', // 查房记录信息添加
    checkRoomGet = '/checkRoom/get', // 获取单条查房记录信息
    checkRoomDeleteAll = '/checkRoom/deleteAll', // 查房批量删除
    checkRoomUpdate = '/checkRoom/update', // 查房记录信息修改
}

// 查房记录列表参数
interface checkRoomListParams extends ListParams {
    name: string;
    beginDate: string;
    endDate: string;
    begId: string;
    addTime: string;
    staffId: number;
}

// 查房记录列表返回值
type checkRoomListRes = ListResponseType<{
    id: number;
    companyId: number;
    elderlyId: number;
    addTime: string;
    addAccountId: number;
    spirit: string;
    diet: string;
    sleep: string;
    shit: string;
    urinate: string;
    communicate: string;
    memory: string;
    temperature: string;
    pulse: string;
    breathe: string;
    blood: string;
    description: string;
    suggest: string;
    begId: number;
    begName: string;
    idCard: string;
    addAccountName: string;
    addAccountPhoto: string;
    elderlyName: string;
    elderlyPhoto: string;
    elderlyGender: string;
    elderlyIdCard: string;
    houseName: string;
    buildingName: string;
    staffId: number;
    staffName: string;
    staffPhoto: string;
}>

// 查房记录列表接口
export function checkRoomListAPI(params: checkRoomListParams): Promise<checkRoomListRes> {
    return r.get(API.checkRoomList, params)
}

export interface checkRoomItem {
    id: number;
}

// 删除查房记录信息接口
export function checkRoomDeleteAPI(id: number): Promise<ResponseType<string>> {
    return r.delete(API.checkRoomDelete + '/' + id)
}

// 查房记录信息添加参数
interface checkRoomAddParams {
    elderlyId: number;
    staffId: number;
    spirit: string;
    diet: string;
    sleep: string;
    shit: string;
    urinate: string;
    communicate: string;
    memory: string;
    temperature: string;
    description: string;
    pulse: string;
    breathe: string;
    blood: string;
    suggest: string;
}

// 查房记录信息添加返回值
type checkRoomAddRes = ResponseType<{
    id: number;
    companyId: number;
    elderlyId: number;
    addTime: string;
    addAccountId: number;
    spirit: string;
    diet: string;
    sleep: string;
    shit: string;
    urinate: string;
    communicate: string;
    memory: string;
    temperature: string;
    pulse: string;
    breathe: string;
    blood: string;
    description: string;
    suggest: string;
    begId: number;
    begName: string;
    idCard: string;
    addAccountName: string;
    addAccountPhoto: string;
    elderlyName: string;
    elderlyPhoto: string;
    elderlyGender: string;
    elderlyIdCard: string;
    houseName: string;
    buildingName: string;
    staffId: number;
    staffName: string;
    staffPhoto: string;
}>

// 查房记录信息添加接口
export function checkRoomAddAPI(params: checkRoomAddParams): Promise<checkRoomAddRes> {
    return r.post(API.checkRoomAdd, params)
}



// 获取单条查房记录信息返回值
type checkRoomGetRes = ResponseType<{
    id: number;
    companyId: number;
    elderlyId: number;
    addTime: string;
    addAccountId: number;
    spirit: string;
    diet: string;
    sleep: string;
    shit: string;
    urinate: string;
    communicate: string;
    memory: string;
    temperature: string;
    pulse: string;
    breathe: string;
    blood: string;
    description: string;
    suggest: string;
    begId: number;
    begName: string;
    idCard: string;
    addAccountName: string;
    addAccountPhoto: string;
    elderlyName: string;
    elderlyPhoto: string;
    elderlyGender: string;
    elderlyIdCard: string;
    houseName: string;
    buildingName: string;
    staffId: number;
    staffName: string;
    staffPhoto: string;
}>

// 获取单条查房记录信息接口
export function checkRoomGetAPI(id: number): Promise<checkRoomGetRes> {
    return r.get(API.checkRoomGet + '/' + id)
}


// 查房批量删除接口
export function checkRoomDeleteAllAPI(params: number[]): Promise<ResponseType<string>> {
    return r.post(API.checkRoomDeleteAll, params)
}




// 查房记录信息修改参数
interface checkRoomUpdateParams {
    id: number;
    companyId: number;
    elderlyId: number;
    addTime: string;
    addAccountId: number;
    spirit: string;
    diet: string;
    sleep: string;
    shit: string;
    urinate: string;
    communicate: string;
    memory: string;
    temperature: string;
    pulse: string;
    breathe: string;
    blood: string;
    description: string;
    suggest: string;
    begId: number;
    begName: string;
    idCard: string;
    addAccountName: string;
    addAccountPhoto: string;
    elderlyName: string;
    elderlyPhoto: string;
    elderlyGender: string;
    elderlyIdCard: string;
    houseName: string;
    buildingName: string;
    staffId: number;
    staffName: string;
    staffPhoto: string;
}

// 查房记录信息修改返回值
type checkRoomUpdateRes = ResponseType<{
    id: number;
    companyId: number;
    elderlyId: number;
    addTime: string;
    addAccountId: number;
    spirit: string;
    diet: string;
    sleep: string;
    shit: string;
    urinate: string;
    communicate: string;
    memory: string;
    temperature: string;
    pulse: string;
    breathe: string;
    blood: string;
    description: string;
    suggest: string;
    begId: number;
    begName: string;
    idCard: string;
    addAccountName: string;
    addAccountPhoto: string;
    elderlyName: string;
    elderlyPhoto: string;
    elderlyGender: string;
    elderlyIdCard: string;
    houseName: string;
    buildingName: string;
    staffId: number;
    staffName: string;
    staffPhoto: string;
}>

// 潜在客户修改接口
export function checkRoomUpdateAPI(params: checkRoomUpdateParams): Promise<checkRoomUpdateRes> {
    return r.put(API.checkRoomUpdate, params)
}